home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / c / c-net_pro / c-netprov3.03a.dms / in.adf / cnet / pfiles / randquote < prev   
Encoding:
Text File  |  1992-05-13  |  1.5 KB  |  54 lines

  1. /******************************************************/
  2. /* Random Quotation Generator 2  for CNet AMIGA v2    */
  3. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       */
  4. /* By Jim Selleck © 1992 Beverly James Products       */
  5. /*                                                    */
  6. /* Installation:                                      */
  7. /*                                                    */
  8. /* Stick this Arexx program and the QUOTATIONS file   */
  9. /* in your PFILES: directory.                    */
  10. /*                                                    */
  11. /******************************************************/
  12.  
  13.    options results
  14.    filename = "pfiles:quotations"
  15.  
  16.    if ~exists(filename) then
  17.  
  18.       do
  19.          transmit " "
  20.          transmit " "
  21.          transmit "The Quotations could not be found!  Please inform"
  22.          transmit "the Sysop !!!"
  23.          transmit " "
  24.          transmit " "
  25.          logentry "Quote: `"||filename||"' not found!"
  26.          exit
  27.       end
  28.  
  29.    call open quote,filename,"R"
  30.  
  31.       max = readln(quote)          /* Get maximum number of entries */
  32.       num = random(0,max-1,time('s'))
  33.       ctr = 0
  34.  
  35.       if num > 0 then
  36.          do until ctr = num*5
  37.             line = readln(quote)
  38.             ctr = ctr+1
  39.          end
  40.  
  41.       transmit " "
  42.       transmit " "
  43.       ctr = 0
  44.  
  45.       do until ctr = 5
  46.          line = readln(quote)
  47.          if length(line) > 1 then transmit center(strip(line),76)
  48.          ctr = ctr+1
  49.       end
  50.  
  51.    call close quote
  52.    exit
  53.  
  54.